﻿<ControlTemplate
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <Grid x:Name="Root">
        <VisualStateManager.VisualStateGroups>
            <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal"/>
                <VisualState x:Name="MouseOver">
                    <Storyboard>
                        <ColorAnimation Duration="0" Storyboard.TargetName="UncheckedVisual" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)" To="#FFFFCB66"/>
                        <ColorAnimation Duration="0" Storyboard.TargetName="UncheckedVisual" Storyboard.TargetProperty="(Shape.Stroke).(SolidColorBrush.Color)" To="#FFFFCB66"/>
                        <ColorAnimation Duration="0" Storyboard.TargetName="CheckedVisual" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)" To="#FFFFCB66"/>
                        <ColorAnimation Duration="0" Storyboard.TargetName="CheckedVisual" Storyboard.TargetProperty="(Shape.Stroke).(SolidColorBrush.Color)" To="#FFFFCB66"/>
                    </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                    <Storyboard>
                        <DoubleAnimation Duration="0" Storyboard.TargetName="Root" Storyboard.TargetProperty="Opacity" To=".7"/>
                    </Storyboard>
                </VisualState>
            </VisualStateGroup>
            <VisualStateGroup x:Name="CheckStates">
                <VisualState x:Name="Unchecked"/>
                <VisualState x:Name="Checked">
                    <Storyboard>
                        <DoubleAnimation Duration="0" Storyboard.TargetName="UncheckedVisual" Storyboard.TargetProperty="Opacity" To="0"/>
                        <DoubleAnimation Duration="0" Storyboard.TargetName="CheckedVisual" Storyboard.TargetProperty="Opacity" To="1"/>
                    </Storyboard>
                </VisualState>
            </VisualStateGroup>
        </VisualStateManager.VisualStateGroups>
        <Grid HorizontalAlignment="Right" Margin="2" Width="17" Height="17" Background="#01000000">
            <Path x:Name="UncheckedVisual" Height="9" Width="6" HorizontalAlignment="Center" VerticalAlignment="Center" Fill="#FF9EC6FB" Stroke="#FF9EC6FB" StrokeLineJoin="Miter" Data="M 0,0 L 0,9 L 5,4.5 Z"/>
            <Path x:Name="CheckedVisual" Height="6" Width="6" HorizontalAlignment="Center" VerticalAlignment="Center" Fill="#FFE56E17" Stroke="#FFE56E17" StrokeLineJoin="Miter" Opacity="0" Data="M 6,0 L 6,6 L 0,6 Z"/>
        </Grid>
    </Grid>
</ControlTemplate>
